//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package org.jeecgframework.poi.excel.entity.params;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class ExcelExportEntity extends ExcelBaseEntity implements Comparable<ExcelExportEntity> {
    private Object key;
    private double width = 10.0D;
    private double height = 10.0D;
    private int exportImageType = 3;
    private String imageBasePath;
    private int orderNum = 0;
    private boolean isWrap;
    private boolean needMerge;
    private boolean mergeVertical;
    private int[] mergeRely;
    private String suffix;
    private boolean isStatistics;
    private boolean colspan;
    private List<String> subColumnList;
    private String groupName;
    private String[] oldReplace;
    private String replaceKey;
    private List<ExcelExportEntity> list;
    /**
     * 是否生成模板下拉
     * @return
     */
    private boolean pullDown;

    /**
     * 注释说明
     * @return
     */
    private String notes;

    public ExcelExportEntity() {
    }

    public ExcelExportEntity(String name) {
        super.name = name;
    }

    public ExcelExportEntity(String name, Object key) {
        super.name = name;
        this.key = key;
    }

    public ExcelExportEntity(String name, Object key, boolean colspan) {
        super.name = name;
        this.key = key;
        this.colspan = colspan;
    }

    public ExcelExportEntity(String name, Object key, int width) {
        super.name = name;
        this.width = (double)width;
        this.key = key;
    }

    public int getExportImageType() {
        return this.exportImageType;
    }

    public double getHeight() {
        return this.height;
    }

    public Object getKey() {
        return this.key;
    }

    public List<ExcelExportEntity> getList() {
        return this.list;
    }

    public int[] getMergeRely() {
        return this.mergeRely == null ? new int[0] : this.mergeRely;
    }

    public int getOrderNum() {
        return this.orderNum;
    }

    public double getWidth() {
        return this.width;
    }

    public boolean isMergeVertical() {
        return this.mergeVertical;
    }

    public boolean isNeedMerge() {
        return this.needMerge;
    }

    public boolean isWrap() {
        return this.isWrap;
    }

    public void setExportImageType(int exportImageType) {
        this.exportImageType = exportImageType;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public void setKey(Object key) {
        this.key = key;
    }

    public void setList(List<ExcelExportEntity> list) {
        this.list = list;
    }

    public void setMergeRely(int[] mergeRely) {
        this.mergeRely = mergeRely;
    }

    public void setMergeVertical(boolean mergeVertical) {
        this.mergeVertical = mergeVertical;
    }

    public void setNeedMerge(boolean needMerge) {
        this.needMerge = needMerge;
    }

    public void setOrderNum(int orderNum) {
        this.orderNum = orderNum;
    }

    public void setWidth(double width) {
        this.width = width;
    }

    public void setWrap(boolean isWrap) {
        this.isWrap = isWrap;
    }

    public String getSuffix() {
        return this.suffix;
    }

    public void setSuffix(String suffix) {
        this.suffix = suffix;
    }

    public boolean isStatistics() {
        return this.isStatistics;
    }

    public void setStatistics(boolean isStatistics) {
        this.isStatistics = isStatistics;
    }

    public String getImageBasePath() {
        return this.imageBasePath;
    }

    public void setImageBasePath(String imageBasePath) {
        this.imageBasePath = imageBasePath;
    }

    public boolean isColspan() {
        return this.colspan;
    }

    public void setColspan(boolean colspan) {
        this.colspan = colspan;
    }

    public List<String> getSubColumnList() {
        return this.subColumnList;
    }

    public void setSubColumnList(List<String> subColumnList) {
        this.subColumnList = subColumnList;
    }

    public String getGroupName() {
        return this.groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public boolean isSubColumn() {
        return this.colspan && (this.subColumnList == null || this.subColumnList.size() == 0);
    }

    public boolean isMergeColumn() {
        return this.colspan && this.subColumnList != null && this.subColumnList.size() > 0;
    }

    public String[] getOldReplace() {
        return oldReplace;
    }

    public void setOldReplace(String[] oldReplace) {
        this.oldReplace = oldReplace;
    }

    public String getReplaceKey() {
        return replaceKey;
    }

    public boolean isPullDown() {
        return pullDown;
    }

    public void setPullDown(boolean pullDown) {
        this.pullDown = pullDown;
    }

    public String getNotes() {
        return notes;
    }

    public void setNotes(String notes) {
        this.notes = notes;
    }

    public void setReplaceKey(String replaceKey) {
        this.replaceKey = replaceKey;
    }

    public List<ExcelExportEntity> initSubExportEntity(List<ExcelExportEntity> all) {
        List<ExcelExportEntity> sub = new ArrayList();
        Iterator var3 = all.iterator();

        while(var3.hasNext()) {
            ExcelExportEntity temp = (ExcelExportEntity)var3.next();
            if (this.subColumnList.contains(temp.getKey())) {
                sub.add(temp);
            }
        }

        this.setList(sub);
        return sub;
    }

    public int compareTo(ExcelExportEntity prev) {
        return this.getOrderNum() - prev.getOrderNum();
    }
}
